//
//  IGNetReachable.m
//  jingdongfang
//
//  Created by BOE on 2017/9/19.
//  Copyright © 2017年 LJL. All rights reserved.
//

#import "IGNetReachable.h"

@implementation IGNetReachable

+ (BOOL)isReachable {
    AFNetworkReachabilityManager *manage = [AFNetworkReachabilityManager sharedManager];
    AFNetworkReachabilityStatus status = manage.networkReachabilityStatus;
    if (status == AFNetworkReachabilityStatusUnknown || status == AFNetworkReachabilityStatusNotReachable) {
        return NO;
    }
    
    return YES;
    
//    RealReachability *reachability = [RealReachability sharedInstance];
//    ReachabilityStatus status = [reachability currentReachabilityStatus];
//    if (status == RealStatusUnknown || status == RealStatusNotReachable) {
//        return NO;
//    }
//
//    return YES;
}

+ (AFNetworkReachabilityStatus)status {
    AFNetworkReachabilityManager *manage = [AFNetworkReachabilityManager sharedManager];
    AFNetworkReachabilityStatus status = manage.networkReachabilityStatus;
    return status;
    
//    RealReachability *reachability = [RealReachability sharedInstance];
//    ReachabilityStatus status = [reachability currentReachabilityStatus];
//    return status;
}

@end
